Python bindings
Python bindings provide access to the full range of the Java TPT API. They can be used in API scripts or directly in TPT projects.
Python bindings used in API scripts can be executed either from the command line, enter tpt.exe --run apiserver <apiRunScript>
, see Command line options, or from the API Script Editor view, see TPT API scripts.
There are two API scripts available to try out in the <TPT installation folder>\examples\TPT API
folder. For passing arguments to API scripts, see the following example:
Python bindings used in TPT projects can be set up in Execution|Platform Configuration|Custom Script or Execution|Execution Configuration|Custom Script.
If set up in the Platform Configuration dialog, they run before the platform starts or after the platform shuts down. If set up in the Execution Configuration dialog, they run at the beginning or end of the test execution, see Custom Scripts.
When using the Python bindings, the following classes and constants can be used without importing Java packages, see Automatically imported classes.